<?php

class Email extends Controller
{
	function Email()
	{
		parent::Controller();	
        $this->load->helper(array('form','url','security'));
	}
    
    function send()
    {
        $this->load->library('email');
        
        $config['protocol'] = 'smtp';
        $config['smtp_host'] = 'ssl://smtp.sina.cn';
        $config['smtp_user'] = 'kinasued';
        $config['smtp_pass'] = 'nenu1849188597';
        $config['smtp_port'] = '25';
        $config['charset'] = 'iso-8859-1';
        $config['wordwrap'] = TRUE;
        $this->email->initialize($config);
        
        $this->email->from('kinasued@sina.cn','kinas');
        $this->email->to('cheny077@vip.qq.com','cheny077');
        
        $this->email->subject('An Test Email');
        $this->email->message('Hello World!');
        if($this->email->send())
        {
            echo "Yes";
        }else{
            echo "Opps";
        }
    }
    
    }